Skip to content

Conversation

@darthoctopus
Copy link
Collaborator

@darthoctopus darthoctopus commented May 24, 2025

  • Rescue some convenience wrapping functions around astroquery from pbjam1
  • Changing order in which hard-coded priors were defined in different l1models, to allow those parameters also to be overriden by addPriors
  • Separate out construction of l1model, and running dynesty to sample its posterior distribution
  • a few jax fixes for the RGB mode-coupling routine (so that we can pass any other number of iterations without making jax recompile an unrolled loop)

@darthoctopus darthoctopus requested a review from nielsenmb June 5, 2025 05:11

# The inclination prior is a sine truncated between 0, and pi/2.
self.priors['inc'] = dist.truncsine()
self.priors['inc'] = dist.truncsine()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for changing the order of things here you'll need to check that it doesn't influence the sampling.

I remember having problems with that at some point, where I thought using dictionaries should have solved this, but apparently it didn't.

Just so we aren't sampling nurot_e when we think it's something else like eps_g.

self.Fpp(num_g, nu_p, nu_g, self.obs['dnu'][0], DPi1), lmbda=lmbda)
return a, b

num_p, num_g = jax.lax.fori_loop(0, self.rootiter, _body, (nu_p, nu_g))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this improve the compile-time?

We of course also need to verify that results don't change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this significantly improves compile times because of no loop unrolling, and allows parameterisation by number of iterations without recompilation. this also is (as far as I can tell) the preferred pattern for for loops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants